
class QCmdParser:
    def __init__(self):
        self.CmdHandleDict = {}

    def CmdHandleRegist(self, cmdObj):
        self.CmdHandleDict[cmdObj.CMDID] = cmdObj.Handle

    def ParsingCmdList(self, cmdList):
        # format of cmdItem: { "cmdID":cmdID, "memberID":memberID, "param":param}
        for cmdItem in cmdList:
            self.CmdHandleDict[cmdItem["cmdID"]](cmdItem["memberID"], cmdItem["param"])
